Optimal. Leaf size=69 \[ \frac {3 i a^3 \log (\sin (c+d x))}{d}+\frac {i a^3 \log (\cos (c+d x))}{d}-\frac {\cot (c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{d}-4 a^3 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3553, 3589, 3475, 3531} \[ \frac {3 i a^3 \log (\sin (c+d x))}{d}+\frac {i a^3 \log (\cos (c+d x))}{d}-\frac {\cot (c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{d}-4 a^3 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3475
Rule 3531
Rule 3553
Rule 3589
Rubi steps
\begin {align*} \int \cot ^2(c+d x) (a+i a \tan (c+d x))^3 \, dx &=-\frac {\cot (c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{d}-\int \cot (c+d x) (a+i a \tan (c+d x)) \left (-3 i a^2+a^2 \tan (c+d x)\right ) \, dx\\ &=-\frac {\cot (c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{d}-\left (i a^3\right ) \int \tan (c+d x) \, dx-\int \cot (c+d x) \left (-3 i a^3+4 a^3 \tan (c+d x)\right ) \, dx\\ &=-4 a^3 x+\frac {i a^3 \log (\cos (c+d x))}{d}-\frac {\cot (c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{d}+\left (3 i a^3\right ) \int \cot (c+d x) \, dx\\ &=-4 a^3 x+\frac {i a^3 \log (\cos (c+d x))}{d}+\frac {3 i a^3 \log (\sin (c+d x))}{d}-\frac {\cot (c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 1.60, size = 144, normalized size = 2.09 \[ \frac {a^3 \csc \left (\frac {c}{2}\right ) \sec \left (\frac {c}{2}\right ) \csc (c+d x) \left (14 d x \cos (2 c+d x)+12 \sin (c) \sin (c+d x) \tan ^{-1}(\tan (4 c+d x))-i \cos (2 c+d x) \log \left (\cos ^2(c+d x)\right )+\cos (d x) \left (3 i \log \left (\sin ^2(c+d x)\right )+i \log \left (\cos ^2(c+d x)\right )-14 d x\right )-3 i \cos (2 c+d x) \log \left (\sin ^2(c+d x)\right )+4 \sin (d x)\right )}{8 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.45, size = 90, normalized size = 1.30 \[ \frac {-2 i \, a^{3} + {\left (i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} - i \, a^{3}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + {\left (3 i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} - 3 i \, a^{3}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} - 1\right )}{d e^{\left (2 i \, d x + 2 i \, c\right )} - d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 2.90, size = 119, normalized size = 1.72 \[ -\frac {-2 i \, a^{3} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right ) + 16 i \, a^{3} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right ) - 2 i \, a^{3} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right ) - 6 i \, a^{3} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) - a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {-6 i \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.32, size = 63, normalized size = 0.91 \[ \frac {i a^{3} \ln \left (\cos \left (d x +c \right )\right )}{d}+\frac {3 i a^{3} \ln \left (\sin \left (d x +c \right )\right )}{d}-4 a^{3} x -\frac {a^{3} \cot \left (d x +c \right )}{d}-\frac {4 a^{3} c}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.67, size = 56, normalized size = 0.81 \[ -\frac {4 \, {\left (d x + c\right )} a^{3} + 2 i \, a^{3} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 3 i \, a^{3} \log \left (\tan \left (d x + c\right )\right ) + \frac {a^{3}}{\tan \left (d x + c\right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.81, size = 38, normalized size = 0.55 \[ -\frac {a^3\,\left (\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,4{}\mathrm {i}+\mathrm {cot}\left (c+d\,x\right )-\ln \left (\mathrm {tan}\left (c+d\,x\right )\right )\,3{}\mathrm {i}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotInvertible} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________